<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
<script type="text/javascript">
function ufOgetValue(){//getValue与ckeditor.js中某方法冲突，所以改成现在这样
	var val = CKEDITOR.instances.editor1.getData();//这里的editor1是下面textarea的id
	//参考网址
	//JS获取CkEditor在线编辑的内容
		//http://www.cnblogs.com/wuqihui/archive/2012/08/18/2645116.html
	//CKEDITOR使用与配置
		//http://www.cnblogs.com/Fskjb/archive/2009/11/16/1603461.html
	if (val.length == 0){
		alert("空白");
	}else{
		alert(val);
	}
}
</script>
<body>
	<form>
		<p>
			<label for="editor1">Editor 1:</label>
			<textarea cols="80" id="editor1" name="editor1" rows="10"></textarea>
		</p>
		<p>
			<input type="button" value="Submit" onclick="ufOgetValue();"/>
		</p>
	</form>
	<script type="text/javascript">CKEDITOR.replace('editor1');</script>
</body>
</html>
